/**
 * Definition for singly-linked list.
 * function ListNode(val) {
 *     this.val = val;
 *     this.next = null;
 * }
 */
function ListNode(val) {
  this.val = val;
  this.next = null;
}
/**
*@param {ListNode} head
 * @return {boolean}
 */
var hasCycle = function (head) {
// 快慢指针
};

let list = {
  val: 1,
  next: {
    val: 2,
    next: {
      val: 3,
      next: {
        val: 4,
        next: {
          val: 5,
          next: null
        }
      }
    }
  }
}

let tail = list
while (tail.next) {
  tail = tail.next
}
tail.next = list


let l2 = {
  val: 1,
  next: null
}

// l2.next = l2



console.log(hasCycle(list))